<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>RanoreXPath 蓝图 | Ranorex Studio用户手册</title>
    <meta name="generator" content="VuePress 1.8.0">
    <link rel="icon" href="/ranorex/img/favicon.ico">
    <script data-ad-client="ca-pub-7828333725993554" async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <meta name="description" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="keywords" content="用户指南的第一章将引导您完成创建第一个自动化测试用例的过程。了解如何在不编码的情况下自动执行测试、验证条目、查看测试报告等。后面的章节涵盖高级主题，例如使用 Selenium WebDriver 进行跨浏览器测试和为移动应用程序测试准备设备。">
    <meta name="baidu-site-verification" content="7F55weZDDc">
    <meta name="theme-color" content="#11a8cd">
    
    <link rel="preload" href="/ranorex/assets/css/0.styles.4f9f6236.css" as="style"><link rel="preload" href="/ranorex/assets/js/app.24b7eaa5.js" as="script"><link rel="preload" href="/ranorex/assets/js/2.ec9fdd2b.js" as="script"><link rel="preload" href="/ranorex/assets/js/79.2d89654c.js" as="script"><link rel="prefetch" href="/ranorex/assets/js/10.10740124.js"><link rel="prefetch" href="/ranorex/assets/js/100.e7028cb5.js"><link rel="prefetch" href="/ranorex/assets/js/101.57840c4c.js"><link rel="prefetch" href="/ranorex/assets/js/102.f88ac37b.js"><link rel="prefetch" href="/ranorex/assets/js/103.3f4ef0af.js"><link rel="prefetch" href="/ranorex/assets/js/104.1c3987fc.js"><link rel="prefetch" href="/ranorex/assets/js/105.39bd6f16.js"><link rel="prefetch" href="/ranorex/assets/js/106.6d99777c.js"><link rel="prefetch" href="/ranorex/assets/js/107.a772dfce.js"><link rel="prefetch" href="/ranorex/assets/js/108.1f6106fd.js"><link rel="prefetch" href="/ranorex/assets/js/109.61465bce.js"><link rel="prefetch" href="/ranorex/assets/js/11.15aa2ac8.js"><link rel="prefetch" href="/ranorex/assets/js/110.87f08865.js"><link rel="prefetch" href="/ranorex/assets/js/111.6de4977a.js"><link rel="prefetch" href="/ranorex/assets/js/112.ac81b438.js"><link rel="prefetch" href="/ranorex/assets/js/113.e4324abb.js"><link rel="prefetch" href="/ranorex/assets/js/114.76da90e6.js"><link rel="prefetch" href="/ranorex/assets/js/115.b0302cf5.js"><link rel="prefetch" href="/ranorex/assets/js/116.dc9013d8.js"><link rel="prefetch" href="/ranorex/assets/js/117.5650909e.js"><link rel="prefetch" href="/ranorex/assets/js/118.83c3ad11.js"><link rel="prefetch" href="/ranorex/assets/js/119.99ea8a2f.js"><link rel="prefetch" href="/ranorex/assets/js/12.f887e0d3.js"><link rel="prefetch" href="/ranorex/assets/js/120.5158a9fc.js"><link rel="prefetch" href="/ranorex/assets/js/121.cd6389de.js"><link rel="prefetch" href="/ranorex/assets/js/122.30b6e23a.js"><link rel="prefetch" href="/ranorex/assets/js/123.14ef94d2.js"><link rel="prefetch" href="/ranorex/assets/js/124.774c039f.js"><link rel="prefetch" href="/ranorex/assets/js/125.ec98d72a.js"><link rel="prefetch" href="/ranorex/assets/js/126.a5374d41.js"><link rel="prefetch" href="/ranorex/assets/js/127.6bb71a7f.js"><link rel="prefetch" href="/ranorex/assets/js/128.dddf9e5d.js"><link rel="prefetch" href="/ranorex/assets/js/129.803e1198.js"><link rel="prefetch" href="/ranorex/assets/js/13.98375c72.js"><link rel="prefetch" href="/ranorex/assets/js/130.7fe218d8.js"><link rel="prefetch" href="/ranorex/assets/js/131.ccdb53c7.js"><link rel="prefetch" href="/ranorex/assets/js/132.f059a1a9.js"><link rel="prefetch" href="/ranorex/assets/js/133.4108c727.js"><link rel="prefetch" href="/ranorex/assets/js/134.9d680a15.js"><link rel="prefetch" href="/ranorex/assets/js/135.6a9d4859.js"><link rel="prefetch" href="/ranorex/assets/js/136.2198a58d.js"><link rel="prefetch" href="/ranorex/assets/js/137.ee7cb289.js"><link rel="prefetch" href="/ranorex/assets/js/138.26c7e792.js"><link rel="prefetch" href="/ranorex/assets/js/139.eeb24972.js"><link rel="prefetch" href="/ranorex/assets/js/14.45cccdbd.js"><link rel="prefetch" href="/ranorex/assets/js/140.7ec1802a.js"><link rel="prefetch" href="/ranorex/assets/js/141.fb7a23f0.js"><link rel="prefetch" href="/ranorex/assets/js/142.6749eff4.js"><link rel="prefetch" href="/ranorex/assets/js/143.431594af.js"><link rel="prefetch" href="/ranorex/assets/js/144.a2f5ce52.js"><link rel="prefetch" href="/ranorex/assets/js/145.0601585d.js"><link rel="prefetch" href="/ranorex/assets/js/146.16feb8bc.js"><link rel="prefetch" href="/ranorex/assets/js/147.5053e695.js"><link rel="prefetch" href="/ranorex/assets/js/148.a353c0d0.js"><link rel="prefetch" href="/ranorex/assets/js/149.31c0ff28.js"><link rel="prefetch" href="/ranorex/assets/js/15.f23b2dea.js"><link rel="prefetch" href="/ranorex/assets/js/150.6542abfd.js"><link rel="prefetch" href="/ranorex/assets/js/151.43e948e3.js"><link rel="prefetch" href="/ranorex/assets/js/152.dd6cabb1.js"><link rel="prefetch" href="/ranorex/assets/js/153.f014da37.js"><link rel="prefetch" href="/ranorex/assets/js/154.6ee45ca5.js"><link rel="prefetch" href="/ranorex/assets/js/155.6ba5415a.js"><link rel="prefetch" href="/ranorex/assets/js/156.e601c1e5.js"><link rel="prefetch" href="/ranorex/assets/js/157.407e013c.js"><link rel="prefetch" href="/ranorex/assets/js/158.0bb7c774.js"><link rel="prefetch" href="/ranorex/assets/js/159.17154eef.js"><link rel="prefetch" href="/ranorex/assets/js/16.5154513b.js"><link rel="prefetch" href="/ranorex/assets/js/160.9d4cb6ba.js"><link rel="prefetch" href="/ranorex/assets/js/161.a53a87be.js"><link rel="prefetch" href="/ranorex/assets/js/162.54b97f63.js"><link rel="prefetch" href="/ranorex/assets/js/163.546cbc2d.js"><link rel="prefetch" href="/ranorex/assets/js/164.7bc339ce.js"><link rel="prefetch" href="/ranorex/assets/js/165.67d4304a.js"><link rel="prefetch" href="/ranorex/assets/js/166.7c1be565.js"><link rel="prefetch" href="/ranorex/assets/js/167.bd0167b7.js"><link rel="prefetch" href="/ranorex/assets/js/168.1aa7878a.js"><link rel="prefetch" href="/ranorex/assets/js/169.d90b4e9c.js"><link rel="prefetch" href="/ranorex/assets/js/17.5fcd13ca.js"><link rel="prefetch" href="/ranorex/assets/js/170.cb5db4fb.js"><link rel="prefetch" href="/ranorex/assets/js/171.b8147650.js"><link rel="prefetch" href="/ranorex/assets/js/172.53f22d79.js"><link rel="prefetch" href="/ranorex/assets/js/173.0e60c801.js"><link rel="prefetch" href="/ranorex/assets/js/174.8c29f5a4.js"><link rel="prefetch" href="/ranorex/assets/js/175.caa398e0.js"><link rel="prefetch" href="/ranorex/assets/js/176.36e20920.js"><link rel="prefetch" href="/ranorex/assets/js/177.1b8ca17e.js"><link rel="prefetch" href="/ranorex/assets/js/178.686cd676.js"><link rel="prefetch" href="/ranorex/assets/js/179.62ed8882.js"><link rel="prefetch" href="/ranorex/assets/js/18.3410087d.js"><link rel="prefetch" href="/ranorex/assets/js/180.a0a2165c.js"><link rel="prefetch" href="/ranorex/assets/js/181.8af8faa3.js"><link rel="prefetch" href="/ranorex/assets/js/182.dc2e7167.js"><link rel="prefetch" href="/ranorex/assets/js/183.ef7688da.js"><link rel="prefetch" href="/ranorex/assets/js/184.5707a5ec.js"><link rel="prefetch" href="/ranorex/assets/js/185.72e933f8.js"><link rel="prefetch" href="/ranorex/assets/js/186.ac3e0f9e.js"><link rel="prefetch" href="/ranorex/assets/js/187.703ef8ea.js"><link rel="prefetch" href="/ranorex/assets/js/188.d04772eb.js"><link rel="prefetch" href="/ranorex/assets/js/189.549c54cf.js"><link rel="prefetch" href="/ranorex/assets/js/19.f5a747d2.js"><link rel="prefetch" href="/ranorex/assets/js/190.a7fb60b7.js"><link rel="prefetch" href="/ranorex/assets/js/191.0b9e402d.js"><link rel="prefetch" href="/ranorex/assets/js/192.db701f56.js"><link rel="prefetch" href="/ranorex/assets/js/193.86245113.js"><link rel="prefetch" href="/ranorex/assets/js/194.26dcdaa9.js"><link rel="prefetch" href="/ranorex/assets/js/195.341ac6b9.js"><link rel="prefetch" href="/ranorex/assets/js/196.e12e179b.js"><link rel="prefetch" href="/ranorex/assets/js/197.604689a4.js"><link rel="prefetch" href="/ranorex/assets/js/198.2e49a4fc.js"><link rel="prefetch" href="/ranorex/assets/js/199.a1811557.js"><link rel="prefetch" href="/ranorex/assets/js/20.fcd6c62f.js"><link rel="prefetch" href="/ranorex/assets/js/200.bbfc3813.js"><link rel="prefetch" href="/ranorex/assets/js/201.dfbdd0b3.js"><link rel="prefetch" href="/ranorex/assets/js/202.4d01f6a5.js"><link rel="prefetch" href="/ranorex/assets/js/203.2fc1b32a.js"><link rel="prefetch" href="/ranorex/assets/js/204.a18e0686.js"><link rel="prefetch" href="/ranorex/assets/js/205.8559eb21.js"><link rel="prefetch" href="/ranorex/assets/js/206.febc4af9.js"><link rel="prefetch" href="/ranorex/assets/js/207.3824dcf1.js"><link rel="prefetch" href="/ranorex/assets/js/208.60a33728.js"><link rel="prefetch" href="/ranorex/assets/js/209.d933f506.js"><link rel="prefetch" href="/ranorex/assets/js/21.cf8fbb66.js"><link rel="prefetch" href="/ranorex/assets/js/210.8f377e06.js"><link rel="prefetch" href="/ranorex/assets/js/211.26f8be02.js"><link rel="prefetch" href="/ranorex/assets/js/212.4a64d44c.js"><link rel="prefetch" href="/ranorex/assets/js/213.fdeb4f41.js"><link rel="prefetch" href="/ranorex/assets/js/214.e34e9a0b.js"><link rel="prefetch" href="/ranorex/assets/js/215.ce7a5ee6.js"><link rel="prefetch" href="/ranorex/assets/js/216.660d864f.js"><link rel="prefetch" href="/ranorex/assets/js/217.b9b06dc0.js"><link rel="prefetch" href="/ranorex/assets/js/218.1c9eb327.js"><link rel="prefetch" href="/ranorex/assets/js/219.9f170a55.js"><link rel="prefetch" href="/ranorex/assets/js/22.148be82a.js"><link rel="prefetch" href="/ranorex/assets/js/220.15dc816e.js"><link rel="prefetch" href="/ranorex/assets/js/221.80b3442a.js"><link rel="prefetch" href="/ranorex/assets/js/222.704d161c.js"><link rel="prefetch" href="/ranorex/assets/js/223.1145a930.js"><link rel="prefetch" href="/ranorex/assets/js/224.f1da1ddc.js"><link rel="prefetch" href="/ranorex/assets/js/225.fa6a9452.js"><link rel="prefetch" href="/ranorex/assets/js/226.18a3865a.js"><link rel="prefetch" href="/ranorex/assets/js/23.cc718ca8.js"><link rel="prefetch" href="/ranorex/assets/js/24.86da407f.js"><link rel="prefetch" href="/ranorex/assets/js/25.f55794a8.js"><link rel="prefetch" href="/ranorex/assets/js/26.034daa9c.js"><link rel="prefetch" href="/ranorex/assets/js/27.2fbbd462.js"><link rel="prefetch" href="/ranorex/assets/js/28.211c41f6.js"><link rel="prefetch" href="/ranorex/assets/js/29.04c0999c.js"><link rel="prefetch" href="/ranorex/assets/js/3.ae597d9c.js"><link rel="prefetch" href="/ranorex/assets/js/30.393ae7bc.js"><link rel="prefetch" href="/ranorex/assets/js/31.c8ad9771.js"><link rel="prefetch" href="/ranorex/assets/js/32.77f25c7a.js"><link rel="prefetch" href="/ranorex/assets/js/33.893cd8eb.js"><link rel="prefetch" href="/ranorex/assets/js/34.ad372005.js"><link rel="prefetch" href="/ranorex/assets/js/35.8b8dfbb2.js"><link rel="prefetch" href="/ranorex/assets/js/36.d4e0c135.js"><link rel="prefetch" href="/ranorex/assets/js/37.616da736.js"><link rel="prefetch" href="/ranorex/assets/js/38.2432a079.js"><link rel="prefetch" href="/ranorex/assets/js/39.8b943467.js"><link rel="prefetch" href="/ranorex/assets/js/4.22fd3e1a.js"><link rel="prefetch" href="/ranorex/assets/js/40.e8eaccc8.js"><link rel="prefetch" href="/ranorex/assets/js/41.76a9eede.js"><link rel="prefetch" href="/ranorex/assets/js/42.89ea171c.js"><link rel="prefetch" href="/ranorex/assets/js/43.f856cbbb.js"><link rel="prefetch" href="/ranorex/assets/js/44.58030fb1.js"><link rel="prefetch" href="/ranorex/assets/js/45.3d09c2fa.js"><link rel="prefetch" href="/ranorex/assets/js/46.b245fc56.js"><link rel="prefetch" href="/ranorex/assets/js/47.bc3b2fa7.js"><link rel="prefetch" href="/ranorex/assets/js/48.b46f224f.js"><link rel="prefetch" href="/ranorex/assets/js/49.4cb3377b.js"><link rel="prefetch" href="/ranorex/assets/js/5.02a8399a.js"><link rel="prefetch" href="/ranorex/assets/js/50.202bba60.js"><link rel="prefetch" href="/ranorex/assets/js/51.70007468.js"><link rel="prefetch" href="/ranorex/assets/js/52.cb4cc59e.js"><link rel="prefetch" href="/ranorex/assets/js/53.8eb695b2.js"><link rel="prefetch" href="/ranorex/assets/js/54.f840fad6.js"><link rel="prefetch" href="/ranorex/assets/js/55.3a7ca993.js"><link rel="prefetch" href="/ranorex/assets/js/56.e54f166f.js"><link rel="prefetch" href="/ranorex/assets/js/57.cc924439.js"><link rel="prefetch" href="/ranorex/assets/js/58.1b6a4239.js"><link rel="prefetch" href="/ranorex/assets/js/59.6e538365.js"><link rel="prefetch" href="/ranorex/assets/js/6.4754e26a.js"><link rel="prefetch" href="/ranorex/assets/js/60.24be2f8a.js"><link rel="prefetch" href="/ranorex/assets/js/61.37707aa9.js"><link rel="prefetch" href="/ranorex/assets/js/62.3f142075.js"><link rel="prefetch" href="/ranorex/assets/js/63.ffca709a.js"><link rel="prefetch" href="/ranorex/assets/js/64.71472536.js"><link rel="prefetch" href="/ranorex/assets/js/65.5a22e1db.js"><link rel="prefetch" href="/ranorex/assets/js/66.12137ec5.js"><link rel="prefetch" href="/ranorex/assets/js/67.216d94c5.js"><link rel="prefetch" href="/ranorex/assets/js/68.b547be06.js"><link rel="prefetch" href="/ranorex/assets/js/69.500ef0be.js"><link rel="prefetch" href="/ranorex/assets/js/7.8d47de9d.js"><link rel="prefetch" href="/ranorex/assets/js/70.17ab2354.js"><link rel="prefetch" href="/ranorex/assets/js/71.becd4c9d.js"><link rel="prefetch" href="/ranorex/assets/js/72.0a81c3ac.js"><link rel="prefetch" href="/ranorex/assets/js/73.c3f7b9bc.js"><link rel="prefetch" href="/ranorex/assets/js/74.489b5d01.js"><link rel="prefetch" href="/ranorex/assets/js/75.15b80f90.js"><link rel="prefetch" href="/ranorex/assets/js/76.37e86e91.js"><link rel="prefetch" href="/ranorex/assets/js/77.8a96a11b.js"><link rel="prefetch" href="/ranorex/assets/js/78.1089236e.js"><link rel="prefetch" href="/ranorex/assets/js/8.197778c9.js"><link rel="prefetch" href="/ranorex/assets/js/80.6c0ca93e.js"><link rel="prefetch" href="/ranorex/assets/js/81.c09d0fd2.js"><link rel="prefetch" href="/ranorex/assets/js/82.2cf30b53.js"><link rel="prefetch" href="/ranorex/assets/js/83.6a836fd5.js"><link rel="prefetch" href="/ranorex/assets/js/84.f56aeffe.js"><link rel="prefetch" href="/ranorex/assets/js/85.fa5f1544.js"><link rel="prefetch" href="/ranorex/assets/js/86.f5d69b57.js"><link rel="prefetch" href="/ranorex/assets/js/87.5da46a4d.js"><link rel="prefetch" href="/ranorex/assets/js/88.2d708653.js"><link rel="prefetch" href="/ranorex/assets/js/89.cd2fa46c.js"><link rel="prefetch" href="/ranorex/assets/js/9.9807028d.js"><link rel="prefetch" href="/ranorex/assets/js/90.33ee88ae.js"><link rel="prefetch" href="/ranorex/assets/js/91.f157a5e7.js"><link rel="prefetch" href="/ranorex/assets/js/92.5652bd0e.js"><link rel="prefetch" href="/ranorex/assets/js/93.4adefe5e.js"><link rel="prefetch" href="/ranorex/assets/js/94.18953313.js"><link rel="prefetch" href="/ranorex/assets/js/95.87b602b5.js"><link rel="prefetch" href="/ranorex/assets/js/96.8eb960e1.js"><link rel="prefetch" href="/ranorex/assets/js/97.19ab9295.js"><link rel="prefetch" href="/ranorex/assets/js/98.3782e119.js"><link rel="prefetch" href="/ranorex/assets/js/99.23b63326.js">
    <link rel="stylesheet" href="/ranorex/assets/css/0.styles.4f9f6236.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/ranorex/" class="home-link router-link-active"><img src="/ranorex/img/RX-logo.png" alt="Ranorex Studio用户手册" class="logo"> <span class="site-name can-hide">Ranorex Studio用户手册</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/ranorex/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="基础" class="dropdown-title"><a href="/ranorex/pages/978dd7/" class="link-title">基础</a> <span class="title" style="display:none;">基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/db051d/" class="nav-link">在20分钟内了解 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d5a062/" class="nav-link">Ranorex Studio</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d8d817/" class="nav-link">Ranorex 录制器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1f8583/" class="nav-link">测试套件</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/3ff037/" class="nav-link">动作</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/980f3d/" class="nav-link">控件库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/2c14f7/" class="nav-link">验证测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8b8105/" class="nav-link">白名单</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/894a89/" class="nav-link">报告</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="高级" class="dropdown-title"><a href="/ranorex/pages/11401f/" class="link-title">高级</a> <span class="title" style="display:none;">高级</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/554573/" class="nav-link">数据驱动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/331ecc/" class="nav-link">追踪UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6943ae/" class="nav-link">Ranorex Spy</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/134d22/" class="nav-link">UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/686444/" class="nav-link">RanoreXPath</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/64711f/" class="nav-link">基于图像的自动化</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/005bb9/" class="nav-link">维护模式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/11012a/" class="nav-link">性能跟踪</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="专家" class="dropdown-title"><a href="/ranorex/pages/9af963/" class="link-title">专家</a> <span class="title" style="display:none;">专家</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/2f0192/" class="nav-link">映射动态UI元素</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/ecebd0/" class="nav-link">RanoreXPath 中的正则表达式</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/847ee6/" class="nav-link">用户代码库</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/b31e73/" class="nav-link">代码模块</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/811ea3/" class="nav-link">Ranorex Studio 集成开发环境</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f87d8c/" class="nav-link">Ranorex 自动化助手</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="网页和移动测试" class="dropdown-title"><a href="/ranorex/pages/7ccd5d/" class="link-title">网页和移动测试</a> <span class="title" style="display:none;">网页和移动测试</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/d74538/" class="nav-link">Web测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/645c60/" class="nav-link">端点</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/6d8643/" class="nav-link">移动测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/dfc2b0/" class="nav-link">高级移动测试</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="接口和连接" class="dropdown-title"><a href="/ranorex/pages/89b55d/" class="link-title">接口和连接</a> <span class="title" style="display:none;">接口和连接</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b79789/" class="nav-link">Ranorex仪器向导</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/43beb2/" class="nav-link">技术仪器</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7bcce0/" class="nav-link">源代码控制和修订控制</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/7d74b6/" class="nav-link">XCOPY 部署</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/18df29/" class="nav-link">持续集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/88ee43/" class="nav-link">TestRail 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/9c9cdb/" class="nav-link">Applitools Eyes 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/f9f2a2/" class="nav-link">远程桌面的 Ranorex</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/1121bd/" class="nav-link">Visual Studio 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/fc83cd/" class="nav-link">Selenium Webdriver 集成</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/38db78/" class="nav-link">插件</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统详细信息" class="dropdown-title"><a href="/ranorex/pages/92d4ae/" class="link-title">系统详细信息</a> <span class="title" style="display:none;">系统详细信息</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/b40b84/" class="nav-link">证书</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/d75d8f/" class="nav-link">设置和配置</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/0f08c7/" class="nav-link">系统要求</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/86b798/" class="nav-link">64位平台</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/31b776/" class="nav-link">静默安装</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="实践应用主题" class="dropdown-title"><a href="/ranorex/pages/74e52a/" class="link-title">实践应用主题</a> <span class="title" style="display:none;">实践应用主题</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/ranorex/pages/5011c0/" class="nav-link">构建您的测试</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/83d6aa/" class="nav-link">常见问题的解决方案</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/8ea041/" class="nav-link">最佳实践</a></li><li class="dropdown-item"><!----> <a href="/ranorex/pages/93ab6d/" class="nav-link">代码示例</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>数据驱动测试</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>跟踪UI元素</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Ranorex Spy</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>UI元素</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>RanoreXPath</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/ranorex/pages/686444/" class="sidebar-link">介绍</a></li><li><a href="/ranorex/pages/ff0477/" aria-current="page" class="active sidebar-link">RanoreXPath 蓝图</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#前言" class="sidebar-link">前言</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#ui元素描述" class="sidebar-link">UI元素描述</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#轴" class="sidebar-link">轴</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#角色-节点" class="sidebar-link">角色（节点）</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#属性-值对-谓词" class="sidebar-link">属性/值对（谓词）</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#ranorexpath结构" class="sidebar-link">RanoreXPath结构</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#基本概念" class="sidebar-link">基本概念</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#ranorexpath示例介绍" class="sidebar-link">RanoreXPath示例介绍</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#结果" class="sidebar-link">结果：</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#ranorexpath特性" class="sidebar-link">RanoreXPath特性</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#重点" class="sidebar-link">重点：</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#结果-2" class="sidebar-link">结果：</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#ranorexpath健壮性" class="sidebar-link">RanoreXPath健壮性</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#示例定义" class="sidebar-link">示例定义</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#结果-3" class="sidebar-link">结果：</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#详细的ranorexpath格式" class="sidebar-link">详细的RanoreXPath格式</a></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#总结" class="sidebar-link">总结：</a></li></ul></li><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#通配符" class="sidebar-link">通配符</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/ranorex/pages/ff0477/#当前示例总结" class="sidebar-link">当前示例总结</a></li></ul></li></ul></li><li><a href="/ranorex/pages/dc4123/" class="sidebar-link">RanoreXPath 语法示例</a></li><li><a href="/ranorex/pages/a4828f/" class="sidebar-link">RanoreXPath 语法</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>基于图像的自动化</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>维护模式</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>性能跟踪</span> <span class="arrow right"></span></p> <!----></section></li></ul> <div class="sidebar-slot sidebar-slot-bottom"><!-- 正方形 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="3508773082"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div></aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-1cd794fe><div class="articleInfo" data-v-1cd794fe><ul class="breadcrumbs" data-v-1cd794fe><li data-v-1cd794fe><a href="/ranorex/" title="首页" class="iconfont icon-home router-link-active" data-v-1cd794fe></a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=%E9%AB%98%E7%BA%A7" title="分类" data-v-1cd794fe>高级</a></li> <li data-v-1cd794fe><a href="/ranorex/categories/?category=RanoreXPath" title="分类" data-v-1cd794fe>RanoreXPath</a></li> <!----></ul> <div class="info" data-v-1cd794fe><div title="作者" class="author iconfont icon-touxiang" data-v-1cd794fe><a href="https://github.com/taylortaurus" target="_blank" title="作者" class="beLink" data-v-1cd794fe>TaylorTaurus</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-1cd794fe><a href="javascript:;" data-v-1cd794fe>2021-11-22</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-content"></div></div></div> <h1><img src="">
          RanoreXPath 蓝图
        </h1> <div class="page-slot page-slot-top"><!-- 固定100% * 90px可显示，max-height:90px未见显示-->
     <ins class="adsbygoogle"
          style="display:inline-block;width:100%;max-height:90px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6625304284"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="theme-vdoing-content content__default"><h1 id="译-ranorexpath-蓝图"><a href="#译-ranorexpath-蓝图" class="header-anchor">#</a> [译] RanoreXPath 蓝图</h1> <p><em>原文地址 👉 <a href="https://www.ranorex.com/help/latest/ranorex-studio-advanced/ranorexpath/ranorexpath-blueprint/" target="_blank" rel="noopener noreferrer">RanoreXPath blueprint<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></em></p> <p><em>@ translator : <a href="https://github.com/taylortaurus" target="_blank" rel="noopener noreferrer">TaylorTaurus<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></em><br> <em>♋ translate time : 2018-7-6</em><br> <em>♋ update time : 2018-7-9</em></p> <hr> <p>本章的目的是介绍和解释RanoreXPath的基本语法及其与Ranorex自动化测试的应用。本章的目标读者是对XPath或RanoreXPath知之甚少或根本不了解的初学者。本章概述了基础知识的基本概念。</p> <h2 id="前言"><a href="#前言" class="header-anchor">#</a> 前言</h2> <hr> <p>RanoreXPath格式建立在W3C XPath语言格式之上。基本上，RanoreXPath是XPath格式的一个子集，并且在某些主题中，RanoreXPath扩展了XPath。与任何其他数学语法一样，RanoreXPath实现定义（扩展）语法和缩写语法。</p> <p>虽然高级和有经验的用户通常使用缩写语法表示法，但这个介绍性章节主要使用定义和扩展的语言表示法。我们建议从本章开始学习RanoreXPath语法。当你取得进步并获得经验时，你可能会发现自己会自动应用缩写语言符号。</p> <p>在必要和有用的情况下，我们提供语法选项和可能的缩写。</p> <h2 id="ui元素描述"><a href="#ui元素描述" class="header-anchor">#</a> UI元素描述</h2> <hr> <p>本节介绍和解释使用RanoreXPath表示法描述单个UI元素。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000010.png" alt="B6010-0000010"><br> <em>使用RanorexXPath指定一个按钮</em></p> <ol><li><strong>基本的RanoreXPath元素：</strong> 一个基本的RanoreXPath包含三个元素-一个轴说明符、一个节点、零个或多个谓词来唯一标识和描述UI元素。</li> <li>RanoreXPath 使用角色按钮和谓词来描述演示应用程序的<strong>退出</strong>按钮，该谓词由唯一标识按钮的<strong>属性--值</strong>对组成</li></ol> <h2 id="轴"><a href="#轴" class="header-anchor">#</a> 轴</h2> <p>轴说明符指示UI元素的树表示中的导航方向。轴说明符的例子是/，/，..
、祖先等。稍后将在本节中更详细地描述它们。</p> <h2 id="角色-节点"><a href="#角色-节点" class="header-anchor">#</a> 角色（节点）</h2> <ul><li>正式的XPath语法将此格式部分定义为节点，而在Ranorex中，这称为角色（又称适配器类型）</li> <li>Ranorex使用引用的UI元素的角色作为RanoreXPath表示法中的主要描述标头</li> <li>如果需要谓词来指定UI元素，则它嵌套在[]中</li></ul> <h2 id="属性-值对-谓词"><a href="#属性-值对-谓词" class="header-anchor">#</a> 属性/值对（谓词）</h2> <ul><li>属性值对可选地用于标识和描述XPath表示法中的UI元素</li> <li>如有必要，可以组合两个或多个属性 - 值对以形成谓词</li> <li>使用前面的@引入属性是一种约定</li> <li>因此，属性值语法可能相当复杂 <code>@attribute ='value'</code> 是常见的惯例</li> <li>属性--值对不仅应用 <code>=</code> 操作符。其他操作符将在后面介绍和解释</li> <li>属性--值对不是标识UI元素的唯一选项。谓词可以由相当复杂的数学结构形成</li></ul> <blockquote><p><strong>注意：</strong><br>
Ranorex自动选择可用属性列表中最合适的属性--值对，以识别和描述UI元素。最合适的是指选择具有最高权重的属性--可由用户更改的属性。因此，可以影响UI元素的自动识别。</p></blockquote> <blockquote><p><strong>扩展阅读</strong>
在Ranorex Studio专家中介绍并解释了通过改变路径权重来映射动态UI元素的专家主题</p></blockquote> <h2 id="ranorexpath结构"><a href="#ranorexpath结构" class="header-anchor">#</a> RanoreXPath结构</h2> <p>本节介绍RanoreXPath的组成，以完全唯一地描述被测应用程序的GUI中的UI元素。 因此，RanoreXPath描述了Ranorex的抽象树表示中UI元素的位置。</p> <h3 id="基本概念"><a href="#基本概念" class="header-anchor">#</a> 基本概念</h3> <p>RanoreXPath结构的基本概念是简单地将UI元素描述链接在一起。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000020.png" alt="B6010-0000020"><br> <em>RanoreXPath结构</em></p> <ol><li><strong>根元素：</strong> 定义当前UI元素树的根，即RanoreXPath格式的开头。</li> <li><strong>路径：</strong> 从根到节点：可选（零个或多个）分支元素，用于定义从根元素到指定节点元素的路径</li> <li><strong>节点元素：</strong> 一个或多个UI元素，由当前的RanoreXPath格式标识</li></ol> <h3 id="ranorexpath示例介绍"><a href="#ranorexpath示例介绍" class="header-anchor">#</a> RanoreXPath示例介绍</h3> <p>假设前一部分的示例--已在RanoreXPath语法中跟踪和描述了<strong>退出</strong>按钮。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000030.png" alt="B6010-0000030"><br> <em>RanoreXPath示例</em></p> <ol><li>跟踪演示应用程序的<strong>退出</strong></li> <li>请参阅Ranorex自动生成的<strong>RanoreXPath</strong>格式</li></ol> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000040.png" alt="B6010-0000040"> <em>Ranorex Spy中的RanoreXPath示例</em></p> <ol start="3"><li>查看UI元素树浏览器，其中UI元素以树状数据结构组织。
<ul><li>根元素是演示应用程序的程序窗口（=form）</li> <li>它的控制名被定义为：<code>RxMainFrame</code></li> <li>节点元素时退出按钮</li> <li>它的控制名被定义为：<code>RxButtonExit</code></li> <li>没有额外的路径元素</li></ul></li> <li>请参阅路径编辑器的RanoreXPath元素。 它们以分层形式表示RanoreXPath元素</li></ol> <h3 id="结果"><a href="#结果" class="header-anchor">#</a> 结果：</h3> <p>退出按钮的最终RanoreXPath格式如下所示：</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000050.png" alt="B6010-0000050"><br> <em>RanoreXPath格式示例结果</em></p> <h2 id="ranorexpath特性"><a href="#ranorexpath特性" class="header-anchor">#</a> RanoreXPath特性</h2> <p>有两种主要方法可以使用和应用RanoreXPath格式。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000060.png" alt="B6010-0000060"><br> <em>RanoreXPath主要应用</em></p> <p>RanoreXPath描述UI元素的目的可以是识别单个UI元素也可以基于定义的分组特征识别一组UI元素。</p> <h3 id="重点"><a href="#重点" class="header-anchor">#</a> 重点：</h3> <p>独立于应用目的，RanoreXPath格式始终是：</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000070.png" alt="B6010-0000070"><br> <em>RanoreXPath原则</em></p> <h3 id="结果-2"><a href="#结果-2" class="header-anchor">#</a> 结果：</h3> <ul><li>细节级别与灵活性对健壮性和执行速度有影响</li> <li>一个非常详细的RanoreXPath导致声明不太健壮，但可能会加快执行时间</li> <li>非常灵活的RanoreXPath变得更加强大，可以免受GUI架构的变化影响，在处理过程中变得更加耗时</li></ul> <h2 id="ranorexpath健壮性"><a href="#ranorexpath健壮性" class="header-anchor">#</a> RanoreXPath健壮性</h2> <p>Ranorex的一个突出特点是其针对图形用户界面中的动态变化的测试用例的稳健性。这种稳健性源于RanoreXPath定义的最大灵活性。</p> <p>RanoreXPath格式的自动生成试图在细节和灵活性之间找到一个很好的折衷方案。 这通常是通过尝试在路径格式中包含合适的容器元素来实现的。
<strong>基本理念是基于通配符运算符。</strong></p> <h3 id="示例定义"><a href="#示例定义" class="header-anchor">#</a> 示例定义</h3> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000080.png" alt="B6010-0000080"><br> <em>RanoreXPath健壮性示例定义</em></p> <ol><li>使用Spy的<strong>Track</strong>功能</li> <li>并在演示应用程序中跟踪测试数据库的Female单选按钮</li></ol> <h3 id="结果-3"><a href="#结果-3" class="header-anchor">#</a> 结果：</h3> <p>使用RanoreXPath，UI元素树浏览器和路径编辑器的项目树视图查看Ranorex Spy中的跟踪结果。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000090.png" alt="B6010-0000090"><br> <em>RanoreXPath健壮性示例结果</em></p> <ol><li><strong>RanoreXPath格式：</strong> <ul><li>请参阅RanoreXPath格式及其组件，并将它们与Spy和路径编辑器中的视图进行比较。</li></ul></li> <li><strong>Spy中的UI元素树浏览器视图</strong> <ul><li>请参阅演示应用程序GUI的UI元素</li> <li>在UI元素树中构造了5个不同的UI元素</li></ul></li> <li><strong>路径编辑器</strong> <ul><li>请参阅路径编辑器树视图中的RanoreXPath项</li> <li>从根到节点元素有7个RanoreXPath项</li> <li>它们共同构成了RanoreXPath格式</li></ul></li></ol> <h3 id="详细的ranorexpath格式"><a href="#详细的ranorexpath格式" class="header-anchor">#</a> 详细的RanoreXPath格式</h3> <p>让我们仔细看看自动生成的RanoreXPath格式：</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000100.png" alt="B6010-0000100"><br> <em>利用通配符使RanoreXPath健壮</em></p> <ol start="4"><li><strong>根元素 <code>RxMainFrame</code>:</strong><br>
此UI元素表示被测应用程序（即演示应用程序）的程序窗口，是RanoreXPath规范的固定部分。</li> <li><strong>通配符：</strong><br>
为使RanoreXPath格式尽可能灵活，Ranorex插入两个通配符 <code>/?</code>（可选）直到下一个固定的RanoreXPath标签项目。</li> <li><strong>固定：</strong>
RanoreXPath项目 <code>RxTabStandard</code>Ranorex将此UI元素分类为RanoreXPathg格式的必要固定部分，以便能够稳健地识别节点UI元素。</li> <li><strong>通配符：</strong><br>
接下来的两个RanoreXPath项再次使用 <code>/？</code> 通配符，以增加UI元素识别的灵活性。</li> <li>最后，<strong>节点</strong>元素 <code>rdbFemale</code> 是RanoreXPath格式的最终固定部分，用于成功且稳健的UI元素识别。</li></ol> <h3 id="总结"><a href="#总结" class="header-anchor">#</a> 总结：</h3> <ul><li>对于通配符，即使底层GUI结构发生变化，Ranorex也能够无疑地识别UI元素</li> <li>在当前示例中，Ranorex指定具有三（3）个固定UI元素的路径，这些元素对于单选按钮的UI元素标识是必不可少的</li> <li>四(4)通配符为GUI更改提供了一种方法，并且不管这些变化如何，它们都是一个健壮的标识。</li> <li>有三种不同的通配符运算符，将在下一节中介绍</li></ul> <h2 id="通配符"><a href="#通配符" class="header-anchor">#</a> 通配符</h2> <p>RanoreXPath规范的灵活性基于通配符。 区分三种不同的通配符运算符：</p> <table><thead><tr><th style="text-align:left;">通配符</th> <th style="text-align:center;">含义</th> <th style="text-align:left;">描述</th></tr></thead> <tbody><tr><td style="text-align:left;"><code>/*</code></td> <td style="text-align:center;">任意一个</td> <td style="text-align:left;">任何UI元素，恰好是一（1）个树级别</td></tr> <tr><td style="text-align:left;"><code>/?</code></td> <td style="text-align:center;">任意一个可选</td> <td style="text-align:left;">任何UI元素，正好是零（0）或一（1）树级别</td></tr> <tr><td style="text-align:left;"><code>//</code></td> <td style="text-align:center;">任意一个后代</td> <td style="text-align:left;">任意数量的树级别的任何UI元素</td></tr></tbody></table> <h3 id="当前示例总结"><a href="#当前示例总结" class="header-anchor">#</a> 当前示例总结</h3> <p>参考当前示例，让我们看一下通配符实现。</p> <p><img src="https://gitee.com/taylortaurus/RX_UserGuide_GitBook_Picbed/raw/master/RanoreXPath/B6010-0000110.png" alt="B6010-0000110"><br> <em>测试示例中通配符的应用</em></p> <ol><li>可以看到UI元素 <code>RxTabControl</code> 被两个 <code>/?/?</code> 通配符替代。这就意味着下一个固定的RanoreXPath项目可以直接在UI元素的根级别或是一（1）、二（2）级别下定义，不用再进一步指定级别。</li> <li>可以看到UI元素 <code>grpGender</code> 被两个 <code>/?/?</code> 通配符替代。这就意味着下一个固定的RanoreXPath项目可以直接在UI元素的根级别或是一（1）、二（2）级别下定义，不用再进一步指定级别。</li></ol> <p>因此，存在高达四（4）个级别的灵活性并且级别未进一步指定，这为GUI结构和内容的重大变化提供了空间。目标UI元素基于两个固定路径部分及其属性<code>controlname</code>找到。</p></div></div> <div class="page-slot page-slot-bottom"><!-- 横向自适应 -->
      <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="6620245489"
          data-ad-format="auto"
          data-full-width-responsive="true"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script></div> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">11/26/2021, 2:14:10 PM</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/ranorex/pages/686444/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">介绍</div></a> <a href="/ranorex/pages/dc4123/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">RanoreXPath 语法示例</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/ranorex/pages/686444/" class="prev">介绍</a></span> <span class="next"><a href="/ranorex/pages/dc4123/">RanoreXPath 语法示例</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/ranorex/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/ranorex/pages/93ab6d/"><div>介绍</div></a> <span>11-22</span></dt></dl><dl><dd>02</dd> <dt><a href="/ranorex/pages/efb1ea/"><div>解决元素未找到错误</div></a> <span>11-22</span></dt></dl><dl><dd>03</dd> <dt><a href="/ranorex/pages/9be76e/"><div>添加解决方案设置到解决方案</div></a> <span>11-22</span></dt></dl> <dl><dd></dd> <dt><a href="/ranorex/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2021-2021
    <span></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <div class="custom-html-window custom-html-window-rb" style="display:;"><div class="custom-wrapper"><i class="close-but">×</i> <div><!-- 固定160*160px -->
      <ins class="adsbygoogle"
          style="display:inline-block;max-width:160px;max-height:160px"
          data-ad-client="ca-pub-7828333725993554"
          data-ad-slot="8377369658"></ins>
      <script>
          (adsbygoogle = window.adsbygoogle || []).push({});
      </script>
      </div></div></div></div><div class="global-ui"><div></div></div></div>
    <script src="/ranorex/assets/js/app.24b7eaa5.js" defer></script><script src="/ranorex/assets/js/2.ec9fdd2b.js" defer></script><script src="/ranorex/assets/js/79.2d89654c.js" defer></script>
  </body>
</html>
